# Contributor: Balló György <ballogyor+arch at gmail dot com>

_pkgbase=PyAudio
pkgname=python-pyaudio
pkgver=0.2.14
pkgrel=1
pkgdesc="Python bindings for PortAudio"
arch=('loong64' 'x86_64')
url="https://people.csail.mit.edu/hubert/pyaudio/"
license=('MIT')
makedepends=('python-setuptools')
depends=('portaudio' 'python')
source=("$_pkgbase-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/P/$_pkgbase/$_pkgbase-$pkgver.tar.gz")
sha256sums=('78dfff3879b4994d1f4fc6485646a57755c6ee3c19647a491f790a0895bd2f87')

build() {
  cd $_pkgbase-$pkgver
  python setup.py build
}

package() {
  cd $_pkgbase-$pkgver
  python3 setup.py install --root "$pkgdir" --optimize=1
  install -Dm644 README.md "$pkgdir/usr/share/licenses/$pkgname/README"
}
